<template>
  <div class="map-pannel">
    <div class="map-pannel-item" @click="goToMap(1)">
      <div class="food-map"></div>
      美食地图
    </div>
    <div class="map-pannel-item" @click="goToMap(2)">
      <div class="travel-map"></div>
      旅游地图
    </div>
  </div>
</template>

<script lang="ts" setup>
const goToMap = (type: number) => {
  uni.navigateTo({ url: `/pages/appMap/appMap?type=${type}` });
};
</script>

<style lang="scss" scoped>
.map-pannel {
  display: flex;
  background-color: white;
  justify-content: space-around;
  border-bottom: 1px solid #eee;
  height: 150rpx;
  text-align: center;
  padding: 10rpx 0;
  box-sizing: border-box;

  .map-pannel-item {
    flex: 1;
    display: flex;
    align-items: center;
    flex-direction: column;
    height: 100%;
    color: #666;

    .food-map,
    .travel-map {
      width: 100px;
      height: 48px;
      background: url("../../../static/images/map.png");
      background-size: cover;
    }
    .food-map {
      background-position: 0 0;
    }
    .travel-map {
      background-position: 0 -48px;
    }
  }
  .map-pannel-item:first-child {
    border-right: 1px solid #eeeeee;
  }
}
</style>
